// plugins/my-plugin.ts
// plugins/element-plus.js
import { defineNuxtPlugin } from '#app'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

export default defineNuxtPlugin((nuxtApp) => {
  // 注册 Pinia
  // const pinia = createPinia()
  // nuxtApp.vueApp.use(pinia)

  // 注册 Element Plus
  nuxtApp.vueApp.use(ElementPlus)

  // 注册 Element Plus 图标
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    nuxtApp.vueApp.component(key, component)
  }
})